feat: [DevOps] Update sap-rpt specification#792
Conversation
newtork
left a comment
There was a problem hiding this comment.
Assuming Content-Encoding=gzip is still supported.
|
Some background on the failing PR: |
| "parameters": [ | ||
| { | ||
| "name": "Content-Encoding", | ||
| "in": "header", | ||
| "description": "Content encoding of the request body. Use 'gzip' for gzip-compressed payloads.", | ||
| "required": false, | ||
| "schema": { | ||
| "type": "string", | ||
| "enum": ["gzip"] | ||
| } | ||
| } | ||
| ], |
There was a problem hiding this comment.
Currently, we rely on the manual addition to spec for gzip encoding support. We have drafted an alternate (programatic) solution for passing custom headers in the PR below.
Once, the above PR has been merged (done) and Cloud SDK 5.28.0 has been released, we would need to do the following
- Remove the manual addition to spec and regenerate
- Set a default header
Content-Encoding: gzipforpredict()calls usingwithDefaultHeader()api
This PR doesn't need to be merged afterwards if there are no other changes.
There was a problem hiding this comment.
The manual changes has been removed and fix applied
| @Nonnull | ||
| public PredictResponsePayload tableCompletion(@Nonnull final PredictRequestPayload requestBody) { | ||
| return api.predict(requestBody, "gzip"); | ||
| return api.withDefaultHeaders(Map.of("Content-Encoding", "gzip")).predict(requestBody); |
There was a problem hiding this comment.
Could you store the api.withDefaultHeaders(Map.of("Content-Encoding", "gzip")) alongside the api so we don't recreate objects at every request
Context
Update sap-rpt specification file based on main.
This PR was created automatically by the spec-update workflow.
You can commit on top of this branch, but as long as this PR is open the action can't be re-run.
Before merging, make sure to update tests and release notes, if necessary.
Definition of Done